<template>
	<div class="bankbang-box">
		<ul class="xintianbang-list">
			<li><span>开户行</span><input type="text" placeholder="请输入开户行名称" v-model="bank_name"/></li>
			<li><span>开户行支行</span><input type="text" placeholder="请输入开户行支行" v-model="bank_address"/></li>
			<li><span>银行卡卡号</span><input type="text" placeholder="请输入银行卡卡号" v-model="bank_num"/></li>
			<li><span>持卡人</span><input type="text" placeholder="请输入持卡人姓名" v-model="bankcard_name"/></li>
		</ul>
		<p class="banktijiao" @click="bangbank">确认绑定</p>
	</div>
</template>

<script>
	export default{
		data () {
			return{
				user:0,
				bank_name:'',
				bank_address:'',
				bank_num:'',
				bankcard_name:''
			}
		},
		created:function(){
			this.user=localStorage.getItem("nt_user");
		},
		methods:{
			bangbank:function(){
				var self=this;
				$.ajax({
					type:"post",
					url:furl+"index.php?app=ajax_epay&act=epay_form",
					data:{'token':self.user,'bank_name':self.bank_name,'open_bank':self.bank_address,'account_name':self.bankcard_name,'bank_num':self.bank_num,'bank_type':1},
					dataType:'json',
					success:function(res){
						if(res.done){
							history.go(-1);
						}
					}
				});
			}
		},
		mounted:function(){
			
		}
	}
</script>

<style>
	.bankbang-box{font-size:0;}
	.xintianbang-list{padding:0.04rem 0.32rem;background-color:#fff;}
	.xintianbang-list>li{border-bottom:1px solid #E8E8E8;height:1rem;line-height: 1rem;}
	.xintianbang-list>li:last-child{border-bottom:none;}
	.xintianbang-list>li>span{font-size:0.28rem;color:#2B2B2B;display: inline-block;width:1.78rem;}
	.xintianbang-list>li>input{height:1rem;line-height: 1rem;font-size:0.28rem;color:#2B2B2B;width:4rem;}
	.banktijiao{margin: 0.6rem 0.32rem;height:1rem;text-align: center;line-height: 1rem;color:#fff;letter-spacing: 0.2rem;box-sizing: border-box;font-size:0.32rem;background-color:#5DB440;border-radius:0.5rem;padding-left: 0.6rem;}
</style>